import React from 'react';
import ReactDOM from 'react-dom';
import {createStore, applyMiddleware, compose} from 'redux';
import {Provider} from 'react-redux'
import thunk from 'redux-thunk';
import {HashRouter} from 'react-router-dom'

import reducers from './reducers/index_reducer'
import './index.css';
import App from './App';
import './utils/JsOperation/axiosFilter'

let store = createStore(
    reducers,
    compose(
        applyMiddleware(thunk),
        window.devToolsExtension ? window.devToolsExtension() : f => f
    ));

ReactDOM.render(
    (
        <Provider store={store}>
            <HashRouter>
                <App />
            </HashRouter>
        </Provider>
    )
    , document.getElementById('root'));
